package com.yu.myporject.controller;

import com.yu.myporject.serviceImpl.MyserviceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class Mycontroller {

    @Resource
    private MyserviceImpl service;

    @GetMapping("/api/getImageByUrl1")
    public void getImageByUrl(){
       service.getImageByUrl();
    }

    @PostMapping("/api/zipImage")
    public String zipImage(@RequestBody Map<String,String> params){

        service.zipImage(params.get("path"));

        return "successful222120000";

    }
}
